Optimal. Leaf size=149 \[ \frac {(2 c d-b e) (-3 b e g+2 c d g+4 c e f) \tan ^{-1}\left (\frac {e (b+2 c x)}{2 \sqrt {c} \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{8 c^{5/2} e^2}+\frac {\sqrt {d (c d-b e)-b e^2 x-c e^2 x^2} (3 b e g-4 c (d g+e f)-2 c e g x)}{4 c^2 e^2} \]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 149, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {779, 621, 204} \begin {gather*} \frac {\sqrt {d (c d-b e)-b e^2 x-c e^2 x^2} (3 b e g-4 c (d g+e f)-2 c e g x)}{4 c^2 e^2}+\frac {(2 c d-b e) (-3 b e g+2 c d g+4 c e f) \tan ^{-1}\left (\frac {e (b+2 c x)}{2 \sqrt {c} \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{8 c^{5/2} e^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 621
Rule 779
Rubi steps
\begin {align*} \int \frac {(d+e x) (f+g x)}{\sqrt {c d^2-b d e-b e^2 x-c e^2 x^2}} \, dx &=\frac {(3 b e g-4 c (e f+d g)-2 c e g x) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}{4 c^2 e^2}+\frac {((2 c d-b e) (4 c e f+2 c d g-3 b e g)) \int \frac {1}{\sqrt {c d^2-b d e-b e^2 x-c e^2 x^2}} \, dx}{8 c^2 e}\\ &=\frac {(3 b e g-4 c (e f+d g)-2 c e g x) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}{4 c^2 e^2}+\frac {((2 c d-b e) (4 c e f+2 c d g-3 b e g)) \operatorname {Subst}\left (\int \frac {1}{-4 c e^2-x^2} \, dx,x,\frac {-b e^2-2 c e^2 x}{\sqrt {c d^2-b d e-b e^2 x-c e^2 x^2}}\right )}{4 c^2 e}\\ &=\frac {(3 b e g-4 c (e f+d g)-2 c e g x) \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}{4 c^2 e^2}+\frac {(2 c d-b e) (4 c e f+2 c d g-3 b e g) \tan ^{-1}\left (\frac {e (b+2 c x)}{2 \sqrt {c} \sqrt {d (c d-b e)-b e^2 x-c e^2 x^2}}\right )}{8 c^{5/2} e^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.79, size = 218, normalized size = 1.46 \begin {gather*} \frac {\sqrt {c} \sqrt {e} (d+e x) \sqrt {e (2 c d-b e)} (b e-c d+c e x) (2 c (2 d g+2 e f+e g x)-3 b e g)+e \sqrt {d+e x} (b e-2 c d)^2 \sqrt {\frac {b e-c d+c e x}{b e-2 c d}} (-3 b e g+2 c d g+4 c e f) \sin ^{-1}\left (\frac {\sqrt {c} \sqrt {e} \sqrt {d+e x}}{\sqrt {e (2 c d-b e)}}\right )}{4 c^{5/2} e^{5/2} \sqrt {e (2 c d-b e)} \sqrt {(d+e x) (c (d-e x)-b e)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [B] time = 3.64, size = 327, normalized size = 2.19 \begin {gather*} \frac {\left (-3 b^2 e^2 g+8 b c d e g+4 b c e^2 f-4 c^2 d^2 g-8 c^2 d e f\right ) \tan ^{-1}\left (\frac {\sqrt {c} \left (2 \sqrt {-b d e-b e^2 x+c d^2-c e^2 x^2}-2 x \sqrt {-c e^2}\right )}{b e}\right )}{8 c^{5/2} e^2}+\frac {\sqrt {-c e^2} \left (3 b^2 e^2 g-8 b c d e g-4 b c e^2 f+4 c^2 d^2 g+8 c^2 d e f\right ) \log \left (b^2 e^2-8 c x \sqrt {-c e^2} \sqrt {-b d e-b e^2 x+c d^2-c e^2 x^2}-4 b c d e-4 b c e^2 x+4 c^2 d^2-8 c^2 e^2 x^2\right )}{16 c^3 e^3}+\frac {\sqrt {-b d e-b e^2 x+c d^2-c e^2 x^2} (3 b e g-4 c d g-4 c e f-2 c e g x)}{4 c^2 e^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.63, size = 403, normalized size = 2.70 \begin {gather*} \left [-\frac {{\left (4 \, {\left (2 \, c^{2} d e - b c e^{2}\right )} f + {\left (4 \, c^{2} d^{2} - 8 \, b c d e + 3 \, b^{2} e^{2}\right )} g\right )} \sqrt {-c} \log \left (8 \, c^{2} e^{2} x^{2} + 8 \, b c e^{2} x - 4 \, c^{2} d^{2} + 4 \, b c d e + b^{2} e^{2} - 4 \, \sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e} {\left (2 \, c e x + b e\right )} \sqrt {-c}\right ) + 4 \, {\left (2 \, c^{2} e g x + 4 \, c^{2} e f + {\left (4 \, c^{2} d - 3 \, b c e\right )} g\right )} \sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e}}{16 \, c^{3} e^{2}}, -\frac {{\left (4 \, {\left (2 \, c^{2} d e - b c e^{2}\right )} f + {\left (4 \, c^{2} d^{2} - 8 \, b c d e + 3 \, b^{2} e^{2}\right )} g\right )} \sqrt {c} \arctan \left (\frac {\sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e} {\left (2 \, c e x + b e\right )} \sqrt {c}}{2 \, {\left (c^{2} e^{2} x^{2} + b c e^{2} x - c^{2} d^{2} + b c d e\right )}}\right ) + 2 \, {\left (2 \, c^{2} e g x + 4 \, c^{2} e f + {\left (4 \, c^{2} d - 3 \, b c e\right )} g\right )} \sqrt {-c e^{2} x^{2} - b e^{2} x + c d^{2} - b d e}}{8 \, c^{3} e^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.54, size = 179, normalized size = 1.20 \begin {gather*} -\frac {1}{4} \, \sqrt {-c x^{2} e^{2} + c d^{2} - b x e^{2} - b d e} {\left (\frac {2 \, g x e^{\left (-1\right )}}{c} + \frac {{\left (4 \, c d g e + 4 \, c f e^{2} - 3 \, b g e^{2}\right )} e^{\left (-3\right )}}{c^{2}}\right )} + \frac {{\left (4 \, c^{2} d^{2} g + 8 \, c^{2} d f e - 8 \, b c d g e - 4 \, b c f e^{2} + 3 \, b^{2} g e^{2}\right )} \sqrt {-c e^{2}} e^{\left (-3\right )} \log \left ({\left | -2 \, {\left (\sqrt {-c e^{2}} x - \sqrt {-c x^{2} e^{2} + c d^{2} - b x e^{2} - b d e}\right )} c - \sqrt {-c e^{2}} b \right |}\right )}{8 \, c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 460, normalized size = 3.09 \begin {gather*} \frac {3 b^{2} e g \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {b}{2 c}\right )}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}}\right )}{8 \sqrt {c \,e^{2}}\, c^{2}}-\frac {b d g \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {b}{2 c}\right )}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}}\right )}{\sqrt {c \,e^{2}}\, c}-\frac {b e f \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {b}{2 c}\right )}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}}\right )}{2 \sqrt {c \,e^{2}}\, c}+\frac {d^{2} g \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {b}{2 c}\right )}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}}\right )}{2 \sqrt {c \,e^{2}}\, e}+\frac {d f \arctan \left (\frac {\sqrt {c \,e^{2}}\, \left (x +\frac {b}{2 c}\right )}{\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}}\right )}{\sqrt {c \,e^{2}}}-\frac {\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, g x}{2 c e}+\frac {3 \sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, b g}{4 c^{2} e}-\frac {\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, d g}{c \,e^{2}}-\frac {\sqrt {-c \,e^{2} x^{2}-b \,e^{2} x -b d e +c \,d^{2}}\, f}{c e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (f+g\,x\right )\,\left (d+e\,x\right )}{\sqrt {c\,d^2-b\,d\,e-c\,e^2\,x^2-b\,e^2\,x}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (d + e x\right ) \left (f + g x\right )}{\sqrt {- \left (d + e x\right ) \left (b e - c d + c e x\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________